import { request } from "@/utils/request";
// // 获取文件Tree结构树
// export function getAllAccessNo(parameter) {
//   return request({
//     url: '/project/Windchill/servlet/rest/hzero/pdm/access/getAllAccessNo',
//     method: 'post',
//     data: parameter,
//   })
// }
// 获取文件Tree结构树
export function getFolderTree(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/pdm/folder/getFolderTree',
    method: 'post',
    data: parameter,
  })
}
// 获取文件Tree结构树内容
export function getFolderContents(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/pdm/folder/getFolderContents',
    method: 'post',
    data: parameter,
  })
}
// 下载文档
export function downloadDoc(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/foundation/doc/downloadDoc',
    method: 'post',
    data: parameter,
    responseType: 'blob' //服务器返回的数据类型
  })
}
// 删除文档
export function deleteObjForAllVersion(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/deleteObjForAllVersion',
    method: 'post',
    data: parameter,
  })
}
// 检入
export function checkinObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/checkinObj',
    method: 'post',
    data: parameter,
  })
}
// 检出
export function checkoutObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/checkoutObj',
    method: 'post',
    data: parameter,
  })
}
// 撤销检出
export function undoCheckoutObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/undoCheckoutObj',
    method: 'post',
    data: parameter,
  })
}
// 粘贴
export function pasteObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/pasteObj',
    method: 'post',
    data: parameter,
  })
}
// 粘贴
export function moveObjForAllVersion(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/moveObjForAllVersion',
    method: 'post',
    data: parameter,
  })
}
// 修订
export function reviseObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/reviseObj',
    method: 'post',
    data: parameter,
  })
}
// 获取交付物状态设定
export function getLifeCycleTemplate(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/getLifeCycleTemplate',
    method: 'post',
    data: parameter,
  })
}
// 设置交付物状态设定
export function setLifeCycleState(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/setLifeCycleState',
    method: 'post',
    data: parameter,
  })
}
// 交付物重命名
export function renameObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/renameObj',
    method: 'post',
    data: parameter,
  })
}
// 获取交付物详情
export function getAttributeGroup(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/attribute/getAttributeGroup',
    method: 'post',
    data: parameter,
  })
}
// 获取编辑访问控制权限
export function findUserAllAccessForObj(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/access/findUserAllAccessForObj',
    method: 'post',
    data: parameter,
  })
}
// 获取编辑访问控制所有权限
export function grantAccess(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/access/grantAccess',
    method: 'post',
    data: parameter,
  })
}
// 查看交付物历史记录
export function getVersionHistory(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/getVersionHistory',
    method: 'post',
    data: parameter,
  })
}
// 上传交付物 获取类型
export function getSubTypes(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/attribute/getSubTypes',
    method: 'post',
    data: parameter,
  })
}
// 获取用户对文档的权限
export function hasAccess(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/attribute/hasAccess',
    method: 'post',
    data: parameter,
  })
}
// 上传交付物
export function createDoc(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/foundation/doc/createDoc',
    method: 'post',
    data: parameter,
  })
}
// 流程操作提交
export function updateDoc(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/foundation/doc/updateDoc',
    method: 'post',
    data: parameter,
  })
}
// 启动签审
export function startDocWfProcess(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/startDocWfProcess',
    method: 'post',
    data: parameter,
  })
}
// 获取用户对文档的权限
export function checkDocActionPermission(parameter) {
  return request({
    url: '/deliver/Windchill/servlet/rest/hzero/foundation/doc/checkDocActionPermission',
    method: 'post',
    data: parameter,
  })
}
// 启动文档签审 获取交付物
export function getDocProcessReviewObjs(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/getDocProcessReviewObjs',
    method: 'post',
    data: parameter,
  })
}
// 启动文档签审 获取交付物
export function initDocReviewObjsByOids(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/initDocReviewObjsByOids',
    method: 'post',
    data: parameter,
  })
}
// 获取交付物流程节点（流程指引）
export function getProcessSteps(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/getProcessSteps',
    method: 'post',
    data: parameter,
  })
}
// 获取交付物流程处理表格数据
export function getDisposeStatus(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/getDisposeStatus',
    method: 'post',
    data: parameter,
  })
}
// 获取交付物名称
export function getDisplayIdentifier(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/getDisplayIdentifier',
    method: 'post',
    data: parameter,
  })
}
// 从待办流程处点击--获取启动交付物流程
export function getWFSelectPrincipal(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/getWFSelectPrincipal',
    method: 'post',
    data: parameter,
  })
}
// 获取启动交付物流程
export function getPageSelectPrincipal(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/getPageSelectPrincipal',
    method: 'post',
    data: parameter,
  })
}
// 添加启动交付物
export function addDocProcessReviewObj(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/addDocProcessReviewObj',
    method: 'post',
    data: parameter,
  })
}
// 删除启动交付物
export function removeDocProcessReviewObj(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/removeDocProcessReviewObj',
    method: 'post',
    data: parameter,
  })
}
// 设置启动交付物流程
export function updateTeamPrincipal(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/pmgt/workflow/updateTeamPrincipal',
    method: 'post',
    data: parameter,
  })
}
// 提交交付物流程设置
export function completeRunningWorkItem(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/completeRunningWorkItem',
    method: 'post',
    data: parameter,
  })
}
// 获取流程操作
export function getRouting(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/getRouting',
    method: 'post',
    data: parameter,
  })
}
// 流程操作提交
export function completeWorkItem(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/completeWorkItem',
    method: 'post',
    data: parameter,
  })
}
// 流程操作提交--转办
export function reassignWorkItem(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/reassignWorkItem',
    method: 'post',
    data: parameter,
  })
}
// 获取项目团队角色
export function getProjectRole(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pmgt/team/getProjectRole',
    method: 'post',
    data: parameter,
  })
}
// 获取文档类型
export function getPrimaryFileType(parameter) {
  return request({
    url: '/project/Windchill/servlet/rest/hzero/pdm/core/getPrimaryFileType',
    method: 'post',
    data: parameter,
  })
}
// 起草人身份操作
export function completeRunningWorkItemBySelf(parameter) {
  return request({
    url: '/workflow/Windchill/servlet/rest/hzero/foundation/workflow/completeRunningWorkItemBySelf',
    method: "post",
    data: parameter,
  });
}